const express = require('express')
const router = express.Router()
// const path = require('path')
// const multer = require('multer')
// const upload = multer({ dest: path.join(__dirname, '../uploads') })
const userInfo_handler = require('../router_handler/userInfo_handler')

// 获取用户信息
router.get('/info',userInfo_handler.getUserInfo)

// 修改用户信息
router.post('/info', userInfo_handler.updateInfo)
// 修改密码
router.post('/changepwd', userInfo_handler.changePwd)

// 上传头像
router.post('/avatar', userInfo_handler.uploadAvatar)

// 获取地址
router.get('/address', userInfo_handler.getAddress)

// 修改地址
router.post('/updateaddress', userInfo_handler.updateAddress)

// 添加地址
router.post('/addaddress', userInfo_handler.addAddress)

// 删除地址
router.post('/deleteaddress', userInfo_handler.deleteAddress)
// 导出
module.exports = router